package com.springcloudserver.service;

import com.springcloudserver.common.AjaxResult;
import com.springcloudserver.config.FeignServIceFallbackConfig;
import com.springcloudserver.config.FeignServiceConfig;
import com.springcloudserver.config.FeignServiceFallFactoryConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @description:
 * @author: chenzuolin
 * @time: 2021/3/17 21:00
 */
@Component
@FeignClient(name = "EUREKA-CLIENT-PROVIDER", /*configuration = FeignServiceConfig.class,*/ fallbackFactory = FeignServiceFallFactoryConfig.class)
public interface FeiginService {

    @GetMapping("/provider/msg")
    AjaxResult hi();

    @GetMapping("/provider/findById/{id}")
    AjaxResult findUserInfoById(@PathVariable("id") String id);

    @GetMapping("/provider/findAll")
    AjaxResult findAllUserInfo();

}
